﻿<%@ Page Title="学生信息" Language="C#" AutoEventWireup="true" MasterPageFile="~/Master.master"
    CodeFile="StudentInfo.aspx.cs" Inherits="StudentInfo" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="head">
</asp:Content>
<asp:Content ID="MainContent" runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <script type="text/javascript">
        function con(obj) {
            if (confirm("确定要进行此操作么？")) {
                return true;
            }
            else {
                return false;
            }
        }
    </script>
    <div style="text-align: left; width: 100%">
        <table>
            <tr>
                <td>
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </td>
                <td>
                    <asp:LinkButton ID="LinkButton1" runat="server" OnClick="lbtn1_Click" CssClass="btn btn-success">搜索</asp:LinkButton>
                </td>
            </tr>
        </table>
    </div>
    <div>
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" AllowPaging="true"
            CssClass="table-hover table-bordered" OnPageIndexChanging="GridView1_PageIndexChanging"
            Width="677px">
            <EmptyDataTemplate>
                无学生信息</EmptyDataTemplate>
            <Columns>
                <asp:TemplateField HeaderText="学号">
                    <ItemTemplate>
                        <%#Eval("sno") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="姓名">
                    <ItemTemplate>
                        <%#Eval("sname") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="性别">
                    <ItemTemplate>
                        <%#Eval("ssex") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="专业">
                    <ItemTemplate>
                        <%#Eval("major") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="班级">
                    <ItemTemplate>
                        <%#Eval("class") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="生日">
                    <ItemTemplate>
                        <%#Convert.ToDateTime(Eval("birth")).ToString("yyyy-MM-dd") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="状态">
                    <ItemTemplate>
                        <%#Eval("go")%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="去向">
                    <ItemTemplate>
                        <%#Eval("gowhere") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:LinkButton ID="LinkButton2" CommandArgument='<%#Eval("sno") %>' OnClientClick="return con();"
                            OnClick="lbtn2_Click" runat="server"><%#getname(Eval("sno").ToString()) %></asp:LinkButton>
                        <asp:LinkButton ID="LinkButton3" runat="server" CommandArgument='<%#Eval("sno") %>'
                            OnClick="lbtn3_Click">修改密码</asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div id="dialog" runat="server" visible="false">
        <div>
            <table>
                <tr>
                    <td>
                        学号：
                    </td>
                    <td>
                        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        姓名：
                    </td>
                    <td>
                        <asp:Label ID="Label2" runat="server" Text="Label"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td>
                        密码：
                    </td>
                    <td>
                        <asp:TextBox ID="TextBox2" runat="server" MaxLength="20"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </div>
        <div>
            <asp:LinkButton ID="lbtnPwd" runat="server" CssClass="btn btn-info" OnClick="lbtnPwd_Click">保存</asp:LinkButton>
            <asp:LinkButton ID="lbtnCancle" runat="server" CssClass="btn btn-info" OnClick="lbtnCancle_Click">取消</asp:LinkButton>
        </div>
    </div>
</asp:Content>
